-- GENERATED SPELL FOR [Talonpriest Ishaal] --


function spell0_23066(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(17843,pUnit)
pUnit:RegisterEvent('Sorts_23066', 1500, 1)
end

function spell1_23066(pUnit, Event) --@Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(12160,pUnit)
pUnit:RegisterEvent('Sorts_23066', 12000, 1)
end

function spell2_23066(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(15654,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23066', 18000, 1)
end

function Sorts_23066(pUnit, Event)
local choix_sorts_23066 = math.random(0, 2)
if choix_sorts_23066 == 0 then
pUnit:RegisterEvent('spell0_23066', 1, 1)
end
if choix_sorts_23066 == 1 then
pUnit:RegisterEvent('spell1_23066', 1, 1)
end
if choix_sorts_23066 == 2 then
pUnit:RegisterEvent('spell2_23066', 1, 1)
end
end

function mob23066_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23066', math.random(1500, 3000), 1)
end

function mob23066_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23066_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23066_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23066, 1, 'mob23066_Action')
RegisterUnitEvent(23066, 2, 'mob23066_Leave')
RegisterUnitEvent(23066, 3, 'mob23066_Kill')
RegisterUnitEvent(23066, 4, 'mob23066_Die')
